package core.util;

public class PassWordUtil {

	public static Boolean validate(String pswd) {
		if (pswd == null) {
			return false;
		}
		if (pswd.length() < 8) {
			return false;
		}
		
		int t1 = 0;
		int t2 = 0;
		int t3 = 0;
		for (int i = 0; i < pswd.length(); i++) {
			char c = pswd.charAt(i);
			int ci = (int) c;
			if (ci >= 48 && ci <= 57) {
				t3++;
			} else if (ci >= 65 && ci <= 90) {
				t2++;
			} else if (ci >= 97 && ci <= 122) {
				t2++;
			} else {
				t1++;
			}
		}
		if(t1==0||t2==0||t3==0){
			return false;
		}
		return true;
	}
}
